<template>
  <div class="App">
    <!-- 快捷链接  -->
    <XtxShortCut></XtxShortCut>

    <!-- 头部导航  -->
    <XtxHeaderNav></XtxHeaderNav>

    <!-- 轮播区域 -->
    <XtxBanner :item="bannersList[0]" @sonEvent="clickMe"></XtxBanner>

    <!-- 新鲜好物 -->
    <XtxNewGoods></XtxNewGoods>

    <!-- 热门品牌 -->
    <XtxHotBrand></XtxHotBrand>

    <!-- 最新专题 -->
    <XtxTopic></XtxTopic>

    <!-- 版权底部 -->
    <XtxFooter></XtxFooter>
  </div>
</template>

<script>
import XtxBanner from "./components/XtxBanner.vue";
import XtxFooter from "./components/XtxFooter.vue";
import XtxNewGoods from "./components/XtxNewGoods.vue";
import XtxHeaderNav from "./components/XtxHeaderNav.vue";
import XtxHotBrand from "./components/XtxHotBrand.vue";
import XtxShortCut from "./components/XtxShortCut.vue";
import XtxTopic from "./components/XtxTopic.vue";

export default {
  components: {
    XtxNewGoods,
    XtxShortCut,
    XtxHeaderNav,
    XtxBanner,
    XtxHotBrand,
    XtxTopic,
    XtxFooter,
  },

  data() {
    return {
      // 假数据
      bannersList: [
        {
          img: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fblog%2F202107%2F19%2F20210719182507_fbc17.thumb.1000_0.gif&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1736083451&t=d6b8b726e5b0f0afbe12c400b03e332d",
          link: "https://www.taobao.com",
          name: "taoBao",
        },
        {
          img: "https://img.alicdn.com/tfs/TB1yB0ZQXXXXXaPXpXXXXXXXXXX-750-375.jpg",
          link: "https://www.taobao.com",
        },
        {
          img: "https://img.alicdn.com/tfs/TB1n5jZQXXXXXbYXpXXXXXXXXXX-750-375.jpg",
          link: "https://www.taobao.com",
        },
      ],
    };
  },

  methods:{
    clickMe(val){
      this.bannersList[0].name = val
      console.log(this.bannersList[0].name,val);
    }
  }
};
</script>

<style></style>
